package com.freewater.springboot.demo.aop.example;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Main {
    public static void main(String[] args) {
        final AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);
        applicationContext.registerShutdownHook();
        SomeBusinessService someBusinessService = applicationContext.getBean(SomeBusinessService.class);
        someBusinessService.doSomeBusiness();
        someBusinessService.doOtherBusiness();
    }
}
